
//
//  UIBarButtonItem+Extension.swift
//  WeiBo
//
//  Created by DDC on 2017/9/7.
//  Copyright © 2017年 DDC. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    // MARK:  - 重构 便利构造函数
    convenience init(title:String, fontSize: CGFloat ,taret: Any?, action: Selector, isBack:Bool = false) {
        
        let btn:UIButton = UIButton.hm_button(withTitle: title, fontSize: fontSize, textColor: UIColor.darkGray, higlightTextColor: UIColor.orange)
        if isBack {
            //  设置按钮图片信息
        }
        
        
        btn.addTarget(taret, action:action, for: .touchUpInside)
        
        self.init(customView: btn)
        
    }
    
}
